<%--
  Created by IntelliJ IDEA.
  User: 27353
  Date: 2024/11/1
  Time: 17:16
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" href="/static/layui/css/layui.css" >
    <style>

    </style>
</head>
<body>
<p>
<form action="/student/list/1" method="post">
    <div class="layui-form-item">
        <div class="layui-inline">
            <div class="layui-input-inline layui-input-wrap">
                <input type="text" placeholder="请输入学号" name="student_num" value="${condition.student_num}" class="layui-input">
            </div>
            <div class="layui-input-inline layui-input-wrap">
                <input type="text" placeholder="请输入姓名" name="student_name" value="${condition.student_name}" class="layui-input">
            </div>
            <button type="submit" class="layui-btn" lay-submit lay-filter="demo1">查询</button>
            <a class="layui-btn layui-bg-blue" href="/student/toadd">新增学生</a>
        </div>
    </div>
</form>
</p>


<table class="layui-table" lay-even>
    <colgroup>
        <col width="150">
        <col width="150">
        <col>
        <col>
    </colgroup>
    <thead>
    <tr>
        <th>编号</th>
        <th>学号</th>
        <th>学生的名</th>
        <th>性别 0:男 1:女 2:保密</th>
        <th>年龄</th>
        <th>出生日期</th>
        <th>班级编号</th>
        <th>宿舍编号</th>
        <th>联系电话</th>
        <th>电子邮件地址</th>
        <th>家庭住址</th>
        <th>紧急联系人姓名</th>
        <th>紧急联系人联系电话</th>
        <th>专业</th>
        <th>学生状态0:在读 1:毕业</th>
        <th>删除标志（0代表存在 1代表删除）</th>
        <th>创建者</th>
        <th>创建时间</th>
        <th>更新者</th>
        <th>更新时间</th>
        <th>备注</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${students}" var="s">
        <tr>
            <td>${s.s_id}</td>
            <td>${s.student_num}</td>
            <td>${s.student_name}</td>
            <td>${s.gender}</td>
            <td>${s.age}</td>
            <td><fmt:formatDate value="${s.date_of_birth}" pattern="yyyy-MM-dd"></fmt:formatDate></td>
            <td>${s.class_id}</td>
            <td>${s.hostel_id}</td>
            <td>${s.phone}</td>
            <td>${s.email}</td>
            <td>${s.home_address}</td>
            <td>${s.emergency_contact}</td>
            <td>${s.emergency_contact_phone}</td>
            <td>${s.major}</td>
            <td>${s.status}</td>
            <td>${s.del_flag}</td>
            <td>${s.create_by}</td>
            <td><fmt:formatDate value="${s.create_time}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate></td>
            <td>${s.update_by}</td>
            <td><fmt:formatDate value="${s.update_time}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate></td>
            <td>${s.remark}</td>
            <td>
                <a href="/student/toupdate/${s.s_id}">编辑</a>
                <a href="/student/delete/${s.s_id}">删除</a>
            </td>
        </tr>
    </c:forEach>
    <tr>
        <td colspan="4">
            <a href="/student/list/1">首页</a>
            <c:if test="${page.currentPage != 1}">
                <a href="/student/list/${page.currentPage-1}">上一页</a>
            </c:if>
            &nbsp;第${page.currentPage}页/总${page.totalPage}页&nbsp;
            <c:if test="${page.currentPage != page.totalPage}">
                <a href="/student/list/${page.currentPage+1}">下一页</a>
            </c:if>
            <a href="/student/list/${page.totalPage}">末页</a>
        </td>
    </tr>
    </tbody>
</table>
</body>
</html>

